package com.school.demo.model.auto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonView;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @author 17379
 */
@ApiModel("响应数据")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ReturnMessage<T> {
    public interface ItemList {

    }
    public interface ItemObject {

    }

    @ApiModelProperty(value = "状态码")
    private int code;
    private String msg;
    @ApiModelProperty(value = "数据偏移量")
    private Long offset;
    @ApiModelProperty(value = "返回数据数量")
    private Long size;
    @ApiModelProperty(value = "总记录数")
    private Long total;
    private Long fileSize;
    private String filePath;
    @ApiModelProperty(value = "数据")
    private List<T> list;
    private T item;

    public ReturnMessage() {
    }
    public ReturnMessage(List<T> list) {
        this.list = list;
    }
    public ReturnMessage(T item) {
        this.item = item;
    }

    public ReturnMessage(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Long getOffset() {
        return offset;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public T getItem() {
        return item;
    }

    public void setItem(T item) {
        this.item = item;
    }
}
